package com.heima.wemedia.service.config;

import com.heima.wemedia.service.interceptor.WebTokenInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

public class WmMvcConfig implements WebMvcConfigurer {
    @Autowired
    private WebTokenInterceptor wmTokenInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(wmTokenInterceptor).addPathPatterns("/api/v1/**");
    }
}
